package com.tjetc.dao;

import com.tjetc.domain.Department;
import com.tjetc.domain.StaffsCount;
import com.tjetc.domain.News;
import com.tjetc.utils.PageInfo;

import java.sql.SQLException;
import java.util.List;

public interface DepartmentDao {

    int getCount(String name) throws SQLException;

    List<Department> list(String name, PageInfo<Department> pageInfo) throws SQLException;

    int add(Department department) throws SQLException;

    int update(Department department) throws SQLException;

    int del(int id) throws SQLException;

    int delByPid(int pid) throws SQLException;

    Department queryById(int id) throws SQLException;

    //查询父科室
    List<Department> queryPidZero() throws SQLException;
    //查询子科室
    List<Department> queryPidNotZero() throws SQLException;
    //查询所有科室
    List<Department> queryAll() throws SQLException;

    Department getById(int depid) throws SQLException;

    List<Department> queryPidDZero() throws SQLException;

    void addNum(Department department) throws SQLException;

    Department getByDid(int id) throws SQLException;

    List<StaffsCount> getStaffsData() throws SQLException;


    List<Department> findByPid(int pid) throws SQLException;

    void setbed(int depid) throws SQLException;

    void setbed1(int depid) throws SQLException;
}
